#include <gmlib/sm9/internal/sm9_field.h>
#include <stdexcept>
#include <cstring>

using namespace sm9::internal;

void test_sm9_fn_inv()
{
    sm9_fn_t    a, c;
    std::uint8_t c_data[32];

    static std::uint8_t a0[32] = {0x3e,0xd3,0x1b,0xf1,0xfe,0xa4,0xb4,0x1d,0x5e,0xe1,0xc4,0xf7,0x1d,0xa8,0xb1,0x8c,0xdb,0x1a,0x26,0x07,0xce,0x23,0x97,0xe4,0xef,0x76,0x7a,0x68,0xbb,0x28,0x11,0x47};
    static std::uint8_t c0[32] = {0x01,0x1b,0x4a,0xf7,0xc9,0xcf,0x74,0x0b,0x24,0x62,0x2e,0x67,0x91,0x14,0x10,0x89,0xbc,0x62,0xbf,0x8f,0xc9,0xaa,0x74,0x78,0x25,0x28,0xed,0x93,0x92,0xa0,0x74,0x51};
    sm9_fn_from_bytes(a, a0);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c0, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a1[32] = {0x95,0x03,0xc7,0xb6,0x15,0x02,0xf0,0x81,0x95,0xf5,0x63,0x03,0x37,0xc7,0x09,0x37,0x77,0xa2,0x67,0xbf,0x41,0x02,0xa1,0xbc,0xf6,0x45,0x25,0x66,0x56,0x6e,0x20,0xbc};
    static std::uint8_t c1[32] = {0x32,0x9a,0xaf,0x3a,0x1f,0x4f,0x0e,0x21,0x77,0xd4,0x36,0xf5,0xb6,0x63,0x99,0xf2,0xdd,0x68,0x12,0xa4,0x95,0xc6,0xed,0x22,0x97,0x9b,0xd9,0x88,0xda,0xcc,0x1b,0xc1};
    sm9_fn_from_bytes(a, a1);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c1, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a2[32] = {0x0a,0xea,0xdb,0x79,0x95,0x06,0x6a,0x25,0xbb,0x2b,0xa6,0xf2,0x51,0xf9,0x8f,0x39,0x21,0x20,0x30,0x9e,0xc1,0x6f,0xef,0x6d,0x43,0x91,0xbf,0xea,0xf5,0x20,0x11,0x8f};
    static std::uint8_t c2[32] = {0x40,0xb5,0x53,0x02,0xa8,0xd2,0x0e,0xcb,0x01,0x98,0x97,0xa5,0x52,0xab,0xb5,0x7e,0xb7,0xe9,0x8f,0x28,0xdc,0xa6,0xdb,0x59,0x9b,0x1d,0x8f,0xf8,0xcd,0x55,0xaf,0xee};
    sm9_fn_from_bytes(a, a2);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c2, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a3[32] = {0xb4,0xa0,0x42,0xd0,0x2c,0x96,0x1e,0xd7,0x8e,0x19,0xa6,0x90,0xb6,0x50,0xe5,0x9c,0x79,0x3f,0x47,0x34,0x0c,0xf9,0x0f,0xc0,0x63,0xae,0x3b,0x0c,0x12,0x36,0xa8,0x52};
    static std::uint8_t c3[32] = {0x84,0x8f,0x97,0x87,0x2e,0xc0,0xb0,0x09,0xa4,0x5a,0x63,0x9d,0x6f,0xf1,0x8c,0x16,0x92,0xbc,0xb1,0x4b,0xac,0x15,0x67,0xe0,0x1e,0x4d,0xd5,0x7a,0x83,0xe0,0xb0,0xbd};
    sm9_fn_from_bytes(a, a3);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c3, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a4[32] = {0x9a,0x12,0xc3,0x51,0x18,0x16,0xb7,0x83,0xa3,0x65,0x21,0x57,0xef,0x88,0x44,0xe4,0xcc,0x06,0x87,0x7e,0x18,0x9a,0x4d,0x1d,0x43,0x12,0x69,0x6a,0xee,0x1b,0x32,0xf6};
    static std::uint8_t c4[32] = {0x1f,0x2e,0x3e,0xee,0x12,0x05,0xf4,0x04,0xd6,0x2f,0x40,0x04,0xd0,0x69,0xd2,0xf3,0x3c,0xc8,0xd8,0x18,0x53,0xae,0x3b,0xe5,0x48,0x49,0xde,0x6e,0xde,0xa6,0xc2,0x25};
    sm9_fn_from_bytes(a, a4);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c4, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a5[32] = {0x37,0x5a,0xe8,0x2b,0xb0,0x0c,0x9e,0x83,0x83,0x9f,0x99,0x21,0xe2,0x02,0x7b,0xe2,0x79,0x5d,0xc5,0x63,0x21,0x7b,0x64,0x1f,0x01,0xd2,0x21,0xb7,0x48,0x4d,0x51,0x90};
    static std::uint8_t c5[32] = {0x32,0xa1,0xcd,0xa5,0xc7,0x5d,0x86,0x0d,0x5d,0x0b,0x41,0xda,0xa8,0x21,0xb5,0x27,0xf3,0xae,0x22,0x55,0xc4,0x7d,0x0b,0x6e,0x55,0xe1,0xf9,0xcd,0x98,0xdb,0xa5,0xea};
    sm9_fn_from_bytes(a, a5);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c5, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a6[32] = {0x7d,0xc9,0x04,0x59,0x28,0x4c,0xc2,0x28,0x84,0x87,0xfb,0x80,0x22,0xe5,0x48,0xc3,0x91,0xee,0xdf,0x49,0xe2,0x5a,0xb8,0x3e,0x16,0xe1,0xbb,0xf7,0x0e,0x7d,0x78,0x60};
    static std::uint8_t c6[32] = {0x1d,0xb5,0x06,0xd2,0x6a,0x80,0x22,0x37,0xa1,0x07,0x0a,0xe5,0x10,0x52,0x1a,0xe3,0x1f,0x95,0xf6,0x9c,0x78,0xa6,0x3c,0x7f,0x70,0x8c,0xb8,0x1a,0x8b,0xb3,0xe3,0x72};
    sm9_fn_from_bytes(a, a6);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c6, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a7[32] = {0x0c,0x00,0x08,0xf2,0x56,0x4d,0xd6,0x04,0x2e,0xb2,0xb8,0xb0,0xf1,0xaf,0xf6,0x36,0xfb,0xad,0xcf,0x4c,0x12,0x22,0xf5,0x01,0x54,0x89,0x0a,0x5e,0x82,0x1b,0x53,0x23};
    static std::uint8_t c7[32] = {0x8a,0x74,0x18,0x3e,0x62,0xa0,0x49,0x40,0x94,0x9b,0x19,0x60,0x94,0x6d,0x5a,0x1c,0x2d,0x53,0x65,0xbd,0x4c,0x9f,0xe9,0xbb,0x17,0xe7,0x47,0x97,0x92,0xcd,0xa4,0xdd};
    sm9_fn_from_bytes(a, a7);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c7, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a8[32] = {0x85,0x59,0x5a,0x60,0x78,0x36,0xe7,0x1c,0xbe,0xe1,0x57,0x6f,0x1e,0xcf,0xe0,0xd0,0xdc,0x09,0x4e,0x6d,0x66,0xdf,0x7d,0x6a,0x5c,0x7b,0x65,0xab,0xd1,0x3e,0x0e,0xeb};
    static std::uint8_t c8[32] = {0x41,0xa8,0x45,0x2e,0x2a,0x03,0x32,0x51,0xfd,0xac,0xe5,0xdd,0x11,0xa7,0xd2,0x29,0xf3,0x22,0x71,0xf4,0x29,0x89,0x84,0xba,0xbd,0xf8,0x09,0xc0,0x05,0xa9,0x22,0xce};
    sm9_fn_from_bytes(a, a8);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c8, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a9[32] = {0x36,0xa0,0x6b,0xd0,0x60,0x13,0x3d,0x19,0x84,0xd3,0x1c,0x84,0x08,0x9f,0x3d,0x6f,0x8e,0x12,0x18,0x4b,0x18,0x4f,0x8b,0xf8,0xdc,0x61,0xda,0xb3,0xb6,0xeb,0x9a,0xdd};
    static std::uint8_t c9[32] = {0x38,0x12,0x2a,0x9c,0x4a,0x12,0x6c,0x5b,0xd7,0xa0,0xe8,0x93,0xc2,0x0e,0xb7,0x3d,0xb0,0xe5,0xa8,0x9c,0xcd,0x0e,0x68,0xa7,0xf0,0xb6,0x1a,0xac,0xfc,0xea,0xd8,0x31};
    sm9_fn_from_bytes(a, a9);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c9, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a10[32] = {0x60,0x50,0x88,0x57,0xaf,0x10,0x61,0x65,0xc5,0x31,0x59,0x6e,0xa9,0x63,0xf7,0x26,0xd3,0x6d,0x13,0xbb,0xfc,0x9a,0x67,0xab,0xf9,0xdd,0x91,0x7d,0xee,0xdd,0x84,0xdd};
    static std::uint8_t c10[32] = {0x7c,0x34,0xe7,0x1f,0xdd,0x07,0x60,0xe5,0x89,0xf7,0x3a,0xe6,0x72,0xf2,0x03,0x86,0xdb,0x7c,0x67,0xbe,0xbf,0xdd,0xad,0x52,0x4b,0x08,0xbd,0xd4,0xdd,0x5c,0x23,0x58};
    sm9_fn_from_bytes(a, a10);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c10, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a11[32] = {0x0b,0x36,0x93,0x5e,0x58,0x77,0xf8,0xfb,0x8c,0x32,0x5d,0xec,0x45,0x1c,0xa8,0xb0,0xa9,0x8c,0xe8,0x15,0x09,0x16,0xda,0x72,0x48,0x83,0x75,0xe6,0x97,0x1b,0xe4,0xb8};
    static std::uint8_t c11[32] = {0x54,0x08,0x59,0xec,0xb2,0x70,0x64,0xc5,0x9f,0x27,0x15,0x02,0x0c,0x14,0xf5,0x07,0x9d,0xe2,0xa1,0xa0,0xe8,0xed,0x01,0x9f,0x80,0x31,0xe3,0xf8,0x48,0x64,0xbf,0xcf};
    sm9_fn_from_bytes(a, a11);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c11, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a12[32] = {0x45,0xf6,0x67,0x49,0xe0,0x2b,0xf8,0x9f,0x18,0x0e,0xa7,0xdb,0xd1,0x3d,0x21,0xbf,0x2b,0x2d,0x75,0x49,0x8a,0x54,0xa5,0x4b,0x2c,0x5d,0xa8,0x16,0xa8,0xb8,0x6b,0x3f};
    static std::uint8_t c12[32] = {0x40,0x7c,0xe4,0xe2,0x76,0x8b,0x96,0x9f,0x47,0x1f,0x6b,0x2c,0xf8,0x55,0x42,0x6c,0x34,0x17,0xe2,0x77,0xbf,0x4c,0x75,0x30,0x2e,0x78,0x6a,0x90,0x0d,0x01,0xd5,0xd4};
    sm9_fn_from_bytes(a, a12);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c12, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a13[32] = {0x26,0xf4,0xad,0xc7,0x11,0x76,0x1a,0x9a,0x8f,0x26,0x4f,0x14,0xec,0xc9,0xae,0x5f,0x64,0x11,0x28,0xb5,0xcf,0xe7,0x95,0x81,0x28,0xc6,0x0c,0x75,0xb4,0xe3,0x94,0xf2};
    static std::uint8_t c13[32] = {0x50,0x51,0xbd,0x0e,0x86,0x29,0xff,0xaf,0x7f,0x10,0xc5,0x47,0x43,0x4f,0xe8,0x51,0xc3,0x83,0x1d,0xaf,0xac,0x3c,0x8d,0x17,0xc5,0xd3,0x76,0xcf,0x13,0x57,0x81,0x0f};
    sm9_fn_from_bytes(a, a13);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c13, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a14[32] = {0x27,0xef,0xb7,0x7d,0x5e,0x36,0x98,0xab,0x6b,0xd4,0x46,0x4e,0x93,0xc4,0xe0,0x05,0x91,0x10,0xd5,0x29,0x35,0x9c,0xd0,0x54,0x83,0x05,0xfd,0xd9,0xba,0x2b,0xb6,0x3a};
    static std::uint8_t c14[32] = {0x54,0xb0,0xa7,0x48,0xdf,0xf1,0x4d,0xf3,0x8e,0xd4,0xa0,0xf8,0x4d,0x24,0xd0,0xee,0xce,0x5f,0x4b,0x48,0x22,0xfd,0x94,0xd9,0x19,0x92,0x61,0xe1,0x6f,0xa8,0x0d,0x51};
    sm9_fn_from_bytes(a, a14);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c14, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a15[32] = {0x1d,0xe6,0xe9,0xc1,0xc1,0x02,0xcc,0x5d,0x57,0x52,0xdb,0x05,0x24,0xc9,0x69,0x34,0x1c,0x4d,0xad,0x4c,0x35,0x3b,0xde,0x06,0xfa,0x0d,0x07,0xc4,0xf8,0xb0,0xdc,0xfb};
    static std::uint8_t c15[32] = {0x78,0x76,0x16,0xe7,0xd1,0xaa,0x0e,0xd2,0x37,0x42,0x29,0x62,0x97,0xef,0xf6,0x68,0xf5,0xb9,0x74,0x53,0x21,0x87,0x13,0x32,0x00,0xf3,0x3e,0xf7,0x2a,0xc4,0xe9,0x25};
    sm9_fn_from_bytes(a, a15);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c15, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a16[32] = {0x53,0x9f,0xc7,0x06,0x71,0x57,0x90,0x7a,0x52,0x77,0x68,0xd2,0xbf,0x38,0x7e,0x62,0x91,0xf8,0xfa,0xa4,0x5f,0xce,0x77,0x80,0xd4,0xfe,0x70,0x40,0x04,0x02,0xfe,0xc1};
    static std::uint8_t c16[32] = {0xa1,0x17,0x58,0x8d,0xdd,0x4b,0x13,0xef,0xdb,0x5a,0xca,0x99,0x87,0x74,0xf7,0x2e,0x43,0xcd,0x50,0x95,0xc9,0x58,0xa2,0x59,0xeb,0x44,0x3e,0x32,0xd2,0x46,0x77,0x9b};
    sm9_fn_from_bytes(a, a16);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c16, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a17[32] = {0x83,0x48,0x57,0xf3,0xa6,0x1d,0x68,0x9a,0x0b,0xff,0x49,0x61,0xdc,0xa0,0x1f,0xdc,0x63,0x47,0x1a,0x86,0xa6,0x96,0x4a,0xfd,0xab,0xea,0xdb,0x89,0xf6,0xe2,0x75,0x8d};
    static std::uint8_t c17[32] = {0xa2,0x3c,0x69,0x03,0x27,0xb0,0xbd,0x7b,0x2b,0x41,0x0d,0x5d,0xdc,0x23,0x1d,0x29,0xab,0x44,0x0b,0xc9,0x39,0xeb,0xef,0xf5,0xaf,0x58,0x31,0x20,0x07,0x09,0x9a,0x03};
    sm9_fn_from_bytes(a, a17);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c17, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a18[32] = {0x1b,0xa9,0xa4,0x14,0xa3,0x7c,0xcf,0xa5,0xcc,0x4a,0xc8,0x88,0xa9,0xa1,0x17,0x44,0x4d,0x25,0xad,0x41,0x51,0xa8,0x21,0xb8,0x62,0x01,0xbd,0xc5,0xcc,0x86,0xb1,0xc1};
    static std::uint8_t c18[32] = {0x08,0xe2,0x98,0xea,0x71,0xc1,0x05,0xc9,0x12,0x33,0xc0,0x10,0xd6,0x16,0x8f,0x6d,0xe0,0x5d,0x2f,0xc8,0xef,0xc6,0xd1,0x70,0x0d,0xd6,0x67,0x8d,0x5f,0xbd,0x66,0x7d};
    sm9_fn_from_bytes(a, a18);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c18, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a19[32] = {0x11,0x07,0x86,0x5f,0xdf,0xfa,0xd3,0x7c,0xb9,0x4f,0x33,0x34,0xc9,0x6f,0x47,0x5b,0x5c,0x5e,0xd1,0x93,0xb7,0x36,0xb2,0xf2,0x04,0xcd,0x03,0xa5,0x0d,0x19,0x5f,0x4d};
    static std::uint8_t c19[32] = {0x62,0xef,0x5f,0xa4,0xf1,0x25,0x06,0xce,0x4f,0xd1,0x85,0xe4,0xcf,0x23,0xf9,0x32,0x5c,0x41,0x6a,0x95,0x5f,0xb9,0xae,0x37,0x17,0x40,0xdd,0x8d,0xa6,0x0c,0xe9,0xbf};
    sm9_fn_from_bytes(a, a19);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c19, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a20[32] = {0x0b,0xe8,0x7b,0x7b,0x72,0x20,0x04,0xcc,0x4f,0xb1,0x4c,0xf7,0x10,0xdd,0x58,0xf1,0xe8,0x45,0x5e,0x4a,0x89,0xe9,0x88,0xd8,0x28,0xae,0x72,0x86,0x92,0x9d,0xe8,0x01};
    static std::uint8_t c20[32] = {0x9e,0xe8,0xbe,0xeb,0x51,0xa5,0x65,0x41,0x5f,0x64,0x76,0x9f,0x8d,0x3c,0xae,0x9d,0xe0,0x2b,0xaf,0x6b,0xa5,0xdc,0xf5,0x7f,0xdd,0x4a,0x60,0xf6,0x47,0x97,0xb9,0xb1};
    sm9_fn_from_bytes(a, a20);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c20, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a21[32] = {0x30,0xca,0x85,0x83,0x7a,0x79,0x7c,0xf3,0x91,0x11,0x7c,0x17,0x93,0xbb,0xa3,0xa6,0xfc,0x6b,0x96,0xd3,0x9f,0x8b,0xca,0x7c,0xb3,0x7a,0x2f,0xd9,0x7b,0xc3,0x94,0x94};
    static std::uint8_t c21[32] = {0x90,0xf0,0xf2,0x10,0x69,0xa6,0x5a,0xec,0x17,0x3a,0xca,0x98,0x45,0xf0,0x73,0x8c,0xd8,0x73,0x99,0x2e,0x4b,0x55,0x77,0xda,0x60,0x05,0x96,0x5e,0x62,0x6f,0xc5,0xf3};
    sm9_fn_from_bytes(a, a21);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c21, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a22[32] = {0x28,0xb5,0x0c,0x41,0xed,0x31,0x85,0x47,0x3f,0xb0,0xf6,0x15,0x9e,0xe4,0xe4,0x9b,0xa6,0x26,0x30,0xac,0x6f,0x63,0x5f,0xc1,0x89,0x4e,0x45,0xcf,0xd2,0xdf,0x88,0xd3};
    static std::uint8_t c22[32] = {0xaa,0xf0,0xaa,0x89,0x76,0x5b,0xfc,0x3d,0x41,0x46,0x1a,0x43,0xea,0xba,0x3d,0x59,0x58,0x36,0x3e,0x99,0x36,0x2a,0x30,0x28,0x66,0xb5,0x6d,0x01,0xdd,0x3f,0xe3,0x59};
    sm9_fn_from_bytes(a, a22);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c22, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a23[32] = {0x25,0x0e,0xfd,0xce,0xc7,0x35,0x37,0xf4,0x09,0xe7,0x52,0xa6,0xf9,0x36,0x72,0x5d,0x3d,0xee,0xa3,0xd2,0xb0,0xce,0xfb,0xec,0xcd,0x2c,0xf1,0xe1,0xa2,0x27,0x0a,0x7d};
    static std::uint8_t c23[32] = {0xa1,0x7a,0x7f,0xa9,0xbc,0x55,0x9c,0x02,0xf6,0x07,0x05,0xc5,0xf6,0x0e,0x6f,0xf1,0xb6,0x01,0x81,0x37,0x29,0x71,0x06,0xb2,0x63,0x64,0x37,0x2b,0x94,0x5f,0x2e,0xd7};
    sm9_fn_from_bytes(a, a23);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c23, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a24[32] = {0x73,0xdb,0xde,0x21,0x0c,0xe2,0x0a,0x36,0x2b,0x74,0xb9,0x84,0x99,0x47,0x39,0xe1,0x7f,0xdf,0x7f,0x0c,0xb4,0xcf,0x74,0x27,0x7a,0x03,0x9e,0xca,0x2c,0x86,0x38,0x21};
    static std::uint8_t c24[32] = {0x35,0xc8,0xf7,0x8d,0x19,0xc3,0x9f,0x3c,0x7f,0x34,0x0e,0xe2,0xae,0x86,0xc8,0x8e,0x6b,0x23,0x33,0x32,0x9d,0x98,0xf1,0xc4,0x36,0x96,0xf4,0xe5,0xa2,0xaf,0x42,0x05};
    sm9_fn_from_bytes(a, a24);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c24, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a25[32] = {0xa1,0xf4,0xb5,0x45,0x1c,0xdf,0x26,0x76,0xb0,0xef,0x1e,0xe5,0xaa,0x21,0xd2,0xd7,0xef,0x51,0x5f,0x16,0xc1,0x8f,0x1f,0x75,0x7a,0x5d,0x5e,0x6d,0xdb,0x4c,0x58,0xa4};
    static std::uint8_t c25[32] = {0x9e,0xf2,0x34,0x07,0x58,0xe1,0x87,0x49,0x97,0xae,0x82,0xd0,0x6c,0x8a,0xfd,0xcd,0x96,0x6c,0x6a,0xf6,0xda,0x89,0x58,0x8d,0x3d,0xbe,0x82,0xdb,0xa6,0x30,0xbb,0x53};
    sm9_fn_from_bytes(a, a25);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c25, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a26[32] = {0x9e,0x94,0x5c,0x91,0x12,0xff,0x45,0x19,0xa3,0x47,0xe1,0x7c,0x87,0x96,0x88,0x57,0x66,0xdd,0x37,0x10,0x93,0xd4,0x65,0x88,0x6a,0xcd,0xe1,0x54,0xca,0x8d,0xe9,0xe9};
    static std::uint8_t c26[32] = {0x6d,0x95,0xb4,0x91,0xbb,0xd5,0xce,0x47,0xdb,0x65,0x7e,0x72,0x9a,0x07,0xc9,0x9b,0xd8,0xe2,0x11,0x88,0x7a,0x9a,0xd5,0x5e,0xff,0xd9,0xc3,0x78,0x55,0xcd,0xf3,0xa4};
    sm9_fn_from_bytes(a, a26);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c26, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a27[32] = {0x36,0x8b,0x20,0xa7,0x26,0x89,0x72,0xf2,0x67,0x9c,0xd6,0x24,0xd0,0xd6,0xd0,0x20,0x12,0xe6,0xc0,0x6a,0xc2,0x6e,0x34,0x8f,0x22,0xdd,0xdd,0x7c,0x49,0xff,0x78,0x2f};
    static std::uint8_t c27[32] = {0x4c,0x95,0x96,0x6c,0xf9,0x28,0xfb,0xd5,0x4f,0xdc,0xd7,0xda,0x9c,0xcc,0x19,0xbc,0x75,0xf5,0x4c,0x4d,0xbe,0xea,0xa4,0xbf,0x09,0x68,0xcc,0x0d,0x04,0x66,0xc9,0x1a};
    sm9_fn_from_bytes(a, a27);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c27, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a28[32] = {0x22,0xe1,0x1c,0xe2,0x62,0xbc,0xfb,0x81,0xce,0x2f,0x08,0xf5,0x45,0xd7,0x8f,0xd2,0x48,0xf0,0xdf,0xd6,0xf5,0x5a,0xfa,0x3a,0x5e,0x75,0x4c,0x58,0xa2,0x56,0x33,0x1a};
    static std::uint8_t c28[32] = {0x2c,0x6a,0x3d,0xe9,0xb0,0xb8,0x6e,0x11,0x8a,0x70,0xb1,0xed,0xdf,0x15,0xac,0x25,0xe9,0x5d,0xa4,0x92,0xeb,0x7c,0x4a,0x26,0x35,0x10,0x55,0x96,0x6d,0xb7,0x02,0x16};
    sm9_fn_from_bytes(a, a28);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c28, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a29[32] = {0x13,0xcd,0x86,0xaf,0x30,0xef,0xd0,0xe2,0x75,0x90,0x35,0xa6,0x4d,0x4a,0xf0,0x10,0x11,0x11,0x46,0xc0,0x4a,0xca,0x58,0x02,0xf5,0xed,0x09,0x54,0xc8,0x0f,0x7a,0x1b};
    static std::uint8_t c29[32] = {0x0b,0x3c,0x78,0x46,0x14,0x1b,0x08,0x6d,0x4d,0xc8,0x0d,0x8a,0xd1,0xac,0x04,0x45,0x6f,0x58,0x20,0xb8,0x57,0xe8,0x3f,0x3a,0x10,0x34,0x1c,0xd2,0x13,0xe9,0x37,0x64};
    sm9_fn_from_bytes(a, a29);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c29, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a30[32] = {0x26,0x86,0xa1,0xb2,0x68,0x66,0x23,0x75,0xaa,0x18,0x39,0x00,0x1d,0x4f,0x59,0x2e,0x63,0x8b,0xf6,0x84,0x1b,0x95,0x9f,0x3e,0x9a,0x3e,0x69,0x52,0xbd,0xf1,0x76,0x00};
    static std::uint8_t c30[32] = {0x65,0x52,0x66,0x12,0xba,0xb9,0x7c,0x3b,0xc8,0x7e,0x80,0x15,0x9a,0x51,0xd8,0x1d,0xc6,0x64,0x19,0xa2,0x3d,0xba,0x3d,0xec,0x63,0xf6,0xbf,0x52,0x90,0xd5,0x8d,0x56};
    sm9_fn_from_bytes(a, a30);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c30, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a31[32] = {0x18,0xf3,0xf4,0x05,0xad,0x19,0x7c,0xd3,0x5e,0x0f,0x63,0x37,0x8f,0x3c,0xfa,0x66,0xbb,0xae,0x2a,0x27,0x7f,0x03,0x6d,0x6f,0x0b,0xa0,0xae,0x56,0x79,0xe4,0x17,0xa1};
    static std::uint8_t c31[32] = {0x06,0x92,0x29,0x13,0x4a,0x22,0x92,0x5e,0xd9,0x28,0xfc,0x4e,0x9f,0x64,0xf9,0xc6,0x12,0x5d,0x5e,0xf7,0x8b,0x94,0x79,0x2b,0x09,0x6b,0xf3,0x4a,0xcb,0x1c,0x43,0xcf};
    sm9_fn_from_bytes(a, a31);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c31, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a32[32] = {0x5a,0xc7,0x19,0xc8,0x4d,0xaf,0x67,0x31,0xeb,0x7d,0x13,0x2c,0x7c,0x1e,0xa1,0xb7,0xcb,0x7e,0x3c,0xed,0x88,0xae,0x44,0x4e,0xa6,0x92,0xa6,0xdf,0x71,0x1d,0xd2,0xb3};
    static std::uint8_t c32[32] = {0x5d,0x82,0x11,0x77,0x1b,0x0f,0x30,0xf1,0x64,0x53,0x96,0x7c,0x5a,0xbc,0x4d,0x21,0x9e,0x2b,0x94,0x51,0xb1,0xe4,0x80,0xc9,0x34,0x1c,0x7a,0x09,0x59,0x00,0xd8,0x0a};
    sm9_fn_from_bytes(a, a32);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c32, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a33[32] = {0x77,0xa4,0xb5,0x0e,0x02,0xea,0x39,0x78,0x1d,0xbf,0xd7,0x7f,0x69,0x3a,0xb1,0xc0,0xb7,0x2c,0x85,0x49,0x5d,0xeb,0x34,0x1b,0x74,0xb0,0xdf,0x2c,0xcd,0xf1,0x5d,0xfc};
    static std::uint8_t c33[32] = {0x20,0x71,0x10,0xd7,0x61,0xe7,0x92,0x6c,0x89,0x72,0xdf,0xb4,0x48,0x3d,0x68,0xed,0xa5,0xb1,0x59,0x97,0x3c,0x00,0x14,0x84,0x06,0xce,0xec,0xa0,0x78,0x32,0x64,0xdc};
    sm9_fn_from_bytes(a, a33);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c33, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a34[32] = {0x04,0xfd,0x47,0x9e,0xf8,0x3a,0x03,0x04,0x0c,0x1f,0x93,0xb0,0x95,0x7d,0x81,0x68,0xa4,0x2d,0x6e,0x94,0x73,0x30,0xb0,0xaf,0x4e,0xa4,0xdd,0x5a,0x87,0x15,0x42,0x26};
    static std::uint8_t c34[32] = {0x8f,0x2f,0xa4,0xa8,0x2a,0x93,0xe2,0xd6,0xa8,0x99,0x7d,0xbf,0x01,0xc4,0xbc,0x0f,0x08,0xc3,0x7a,0x96,0xfe,0xbd,0x2f,0x56,0xc5,0x89,0x96,0xcc,0x7c,0x4f,0x8c,0x66};
    sm9_fn_from_bytes(a, a34);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c34, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a35[32] = {0x39,0x99,0xf1,0xeb,0xe1,0x19,0x50,0x4f,0x51,0xfe,0xce,0x1e,0xdc,0x6d,0x48,0xf2,0xab,0x8e,0x66,0x0c,0x00,0x0e,0x68,0x8e,0xca,0xf5,0x6e,0xc9,0xef,0xb7,0x94,0xa3};
    static std::uint8_t c35[32] = {0x04,0x9c,0x29,0xee,0x2d,0x1a,0xe9,0xb6,0x14,0xc5,0x26,0xe3,0x09,0x2c,0x23,0x6c,0x22,0xb4,0x55,0xb2,0x2e,0xb6,0x05,0x4a,0xa3,0xfd,0x0f,0x97,0x1a,0x83,0x8a,0x22};
    sm9_fn_from_bytes(a, a35);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c35, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a36[32] = {0x3a,0xb7,0x7e,0x2c,0xcb,0xef,0xa9,0x85,0x58,0x3e,0xcd,0x40,0xff,0xc3,0xc6,0x36,0xf4,0xd1,0x3c,0x11,0xd9,0x65,0xc0,0x78,0x2a,0x24,0x99,0x01,0xbc,0xc8,0x39,0xf2};
    static std::uint8_t c36[32] = {0x8b,0x7f,0xd7,0xcf,0x07,0x5e,0x70,0xd6,0xa6,0x82,0xd9,0x2b,0xbb,0x38,0x3b,0x19,0xd4,0x56,0x79,0x02,0xb5,0xdc,0xe1,0x20,0xc5,0x33,0x29,0xf9,0xb2,0xf9,0xbf,0x6e};
    sm9_fn_from_bytes(a, a36);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c36, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a37[32] = {0x0b,0x97,0xba,0xc9,0x6d,0x04,0xdb,0x24,0x40,0x79,0x7f,0xf9,0x46,0x0d,0xcb,0x70,0xd4,0xc1,0xb0,0xb5,0xc9,0x8e,0xf5,0xf4,0xee,0x5d,0x55,0x37,0xe5,0xac,0x13,0x03};
    static std::uint8_t c37[32] = {0x9d,0xf1,0x49,0x29,0x96,0x91,0x9c,0x13,0x20,0xde,0x5f,0xe7,0x2f,0xe4,0xb5,0xe0,0xa6,0x71,0x50,0x8b,0xc8,0x26,0x32,0x14,0x59,0x95,0xd7,0xa1,0xe9,0xf6,0x33,0xd2};
    sm9_fn_from_bytes(a, a37);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c37, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a38[32] = {0x51,0x3d,0xd8,0xad,0xbd,0xbb,0x23,0x4e,0x28,0x1a,0x52,0x66,0xe8,0xb9,0x21,0x35,0xa3,0xdd,0x36,0x22,0x99,0x8a,0x8d,0x4e,0x30,0x42,0x97,0x3f,0x44,0xb6,0x31,0x9a};
    static std::uint8_t c38[32] = {0x96,0xdb,0xb5,0x48,0xb6,0xcc,0x81,0xa8,0x95,0xea,0x7b,0xae,0xdf,0x00,0xb6,0x80,0xed,0x16,0xcc,0x8a,0x44,0xcd,0x07,0x29,0x19,0x0b,0x4f,0x83,0x00,0x1e,0x20,0xac};
    sm9_fn_from_bytes(a, a38);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c38, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a39[32] = {0x2e,0x3e,0xb8,0x03,0xaa,0x36,0xf9,0x79,0xa4,0x03,0x42,0x0b,0xf7,0x97,0x05,0xd6,0xf9,0x0a,0xac,0x66,0x22,0xa2,0x7e,0x04,0xe8,0xc5,0xe3,0x9b,0xb0,0x12,0xa4,0x39};
    static std::uint8_t c39[32] = {0x00,0x88,0x42,0xcb,0x3d,0x90,0x8d,0xd5,0xa6,0x61,0x1f,0xa9,0xdd,0xfd,0x9a,0x28,0x43,0x5a,0xa8,0xc8,0xaf,0x60,0x92,0x14,0x93,0x43,0xd1,0x03,0x36,0xa6,0xe5,0x46};
    sm9_fn_from_bytes(a, a39);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c39, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a40[32] = {0x72,0x8e,0x73,0x95,0x92,0xb3,0x97,0xa6,0xab,0xbc,0x6c,0xd4,0xb9,0x71,0xb5,0x48,0x47,0xf0,0x41,0x88,0x02,0xbd,0x75,0x21,0xd4,0x89,0x25,0x7f,0x90,0xc8,0x00,0x74};
    static std::uint8_t c40[32] = {0x70,0xb4,0xa3,0x4e,0xf0,0x8c,0xa3,0xfe,0x30,0xa1,0x6b,0x63,0x5a,0x65,0x51,0x81,0x0a,0x12,0x2d,0x8f,0x82,0xde,0x1c,0x56,0x39,0x8d,0xda,0x3a,0x04,0xae,0xf7,0xde};
    sm9_fn_from_bytes(a, a40);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c40, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a41[32] = {0x9d,0xe0,0x3a,0x25,0x97,0x78,0x03,0x3a,0xdb,0x8a,0xd0,0x73,0x71,0xbc,0xd3,0x1a,0x0a,0x52,0xfd,0x0b,0x86,0xdf,0xfc,0x57,0x31,0xc9,0xde,0xde,0xca,0x9e,0xde,0x97};
    static std::uint8_t c41[32] = {0x93,0x9c,0xa6,0xd9,0x07,0xc5,0x01,0xe6,0xaa,0xa2,0x3b,0x12,0x5b,0x8e,0x67,0xf8,0xf4,0xee,0x3b,0xb8,0x1f,0x77,0xfc,0x11,0x22,0x35,0x81,0xc7,0xb7,0xa9,0x7e,0x3d};
    sm9_fn_from_bytes(a, a41);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c41, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a42[32] = {0xa1,0x55,0x82,0xd3,0x20,0x1b,0xfe,0xc0,0x85,0x92,0x43,0x40,0x4a,0x3c,0x5e,0x33,0xa9,0xf6,0xd3,0x6c,0x44,0xfb,0x57,0x7e,0x23,0xfd,0x18,0x8d,0x35,0x49,0x73,0xd2};
    static std::uint8_t c42[32] = {0x61,0xb5,0x5b,0x62,0x7a,0xc4,0xdd,0xf0,0x36,0xb6,0x97,0xe1,0x8a,0xd9,0x53,0x15,0x65,0xc5,0x6d,0x73,0x71,0xd6,0x27,0xee,0x23,0x52,0xca,0x41,0xeb,0x36,0x9f,0x00};
    sm9_fn_from_bytes(a, a42);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c42, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a43[32] = {0x38,0x3d,0x00,0x6d,0xe3,0x44,0x9c,0x8c,0x80,0x0b,0xb7,0x5e,0xe9,0x4b,0xc2,0x02,0x32,0xf0,0x3d,0xd2,0x5c,0x91,0x7b,0xa3,0xde,0x7e,0x81,0x90,0x8d,0xdc,0x8a,0xca};
    static std::uint8_t c43[32] = {0x29,0x21,0x9b,0xdf,0x48,0x48,0xec,0x89,0x25,0x12,0x99,0x0c,0x3e,0x43,0xa5,0xef,0xaf,0x1e,0x16,0x06,0x4d,0x24,0x95,0xb7,0x05,0x95,0x8e,0x07,0x59,0xcb,0x2a,0xb5};
    sm9_fn_from_bytes(a, a43);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c43, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a44[32] = {0x15,0x7c,0xfe,0xe7,0xea,0x7b,0xa7,0x99,0x5c,0x9b,0x85,0xdd,0xe2,0x7c,0xf2,0x1b,0xda,0x72,0xa0,0x3d,0xd4,0x6f,0xd0,0xab,0xae,0xb7,0x1f,0xc9,0x3d,0xec,0x56,0x42};
    static std::uint8_t c44[32] = {0x39,0x31,0x6e,0x77,0x6d,0x26,0xf1,0xba,0x54,0xb7,0x45,0x08,0x9c,0x4d,0x6e,0xcf,0xa9,0xaf,0x5d,0x42,0xc2,0x39,0xe9,0xbd,0x4f,0xa2,0xc8,0xbb,0xc6,0x8a,0x54,0x2b};
    sm9_fn_from_bytes(a, a44);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c44, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a45[32] = {0x35,0xfb,0xcd,0x25,0x7c,0x04,0x01,0xb9,0x41,0xc9,0xdc,0x65,0xb1,0xfc,0xd8,0xbd,0x2a,0x06,0xba,0x00,0xfd,0xfe,0xf6,0x34,0x88,0xea,0xae,0xf0,0xcc,0xdd,0xfe,0xc7};
    static std::uint8_t c45[32] = {0x17,0x64,0xe7,0x35,0x16,0xcb,0x08,0x64,0x75,0x56,0x6b,0x6b,0xd8,0xe9,0xfa,0x72,0x17,0x35,0xe4,0x54,0xe5,0xc7,0x20,0xe1,0xe2,0xea,0xeb,0x80,0x70,0xa1,0xd4,0xbc};
    sm9_fn_from_bytes(a, a45);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c45, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a46[32] = {0x36,0x30,0xb2,0x29,0x66,0xc5,0x43,0x97,0x9a,0x62,0xa4,0x67,0x36,0x52,0x82,0x99,0x96,0x95,0xf7,0xd0,0x7c,0xcc,0x18,0xbf,0x22,0xb7,0x9d,0xe0,0x0d,0xc6,0xf0,0xf5};
    static std::uint8_t c46[32] = {0x15,0xbd,0x05,0xe3,0x6a,0xf2,0xf2,0x74,0x85,0x57,0xd9,0x37,0xe2,0x30,0xc2,0x18,0x49,0xf6,0x3f,0x0f,0xf3,0x35,0x9f,0xc7,0xe0,0x9f,0x31,0x2a,0x15,0x0b,0xf2,0xd3};
    sm9_fn_from_bytes(a, a46);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c46, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a47[32] = {0x29,0x0e,0xa8,0x20,0x48,0x87,0xe6,0x18,0x5a,0xff,0x66,0x9f,0xbe,0x88,0x60,0x56,0xcc,0x67,0xa8,0x42,0xe7,0xaf,0x05,0x9e,0x4f,0xd3,0xda,0x24,0x83,0x3e,0x03,0x89};
    static std::uint8_t c47[32] = {0x02,0x12,0x99,0x83,0xc3,0x29,0x07,0xd4,0xc5,0x8a,0x69,0x81,0x2c,0xc0,0xda,0xfa,0x79,0xc1,0x3f,0x86,0x1e,0xda,0x55,0xa0,0x5b,0xa0,0xa9,0xa3,0xf3,0x83,0x6c,0x81};
    sm9_fn_from_bytes(a, a47);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c47, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a48[32] = {0xa3,0xb8,0x73,0x09,0x72,0xfa,0xb5,0x80,0xc1,0x18,0xad,0xd3,0x9f,0xec,0xa5,0x1d,0x05,0xc9,0x0e,0x28,0x20,0x43,0xed,0x98,0xa1,0x80,0xa5,0x75,0xf4,0xda,0x5a,0xfb};
    static std::uint8_t c48[32] = {0x6a,0x42,0xdb,0x07,0x2d,0xf2,0x09,0x12,0x14,0xdb,0x3d,0xc2,0x4f,0x8b,0xe0,0x62,0x8e,0xf7,0xd8,0x7a,0xda,0x9d,0x82,0x56,0x20,0x71,0x0a,0xea,0xeb,0x2d,0xa1,0xf7};
    sm9_fn_from_bytes(a, a48);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c48, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a49[32] = {0x0c,0x74,0x47,0x9a,0xae,0xfe,0xaf,0x5c,0xbc,0xe2,0x8e,0x33,0x9c,0x08,0xc4,0x28,0xb8,0xb7,0xe9,0x85,0xc1,0x27,0x31,0xb9,0x7c,0x9c,0xf7,0x11,0xbc,0x1e,0x93,0x18};
    static std::uint8_t c49[32] = {0x6d,0x47,0x26,0xb5,0x48,0x77,0xbc,0xb1,0x8f,0x42,0xa8,0xf0,0x11,0x98,0x75,0xef,0x36,0x94,0x7e,0xae,0xca,0x54,0x18,0x20,0xe4,0x19,0x79,0xdf,0x27,0xa0,0x76,0x4f};
    sm9_fn_from_bytes(a, a49);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c49, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a50[32] = {0x44,0x2d,0x61,0x09,0x82,0x7e,0x6b,0x62,0xc6,0x5d,0xe1,0x0d,0xfb,0xfd,0x25,0x37,0xfa,0x25,0x85,0x7c,0x4d,0x68,0x8c,0x4a,0x74,0x7e,0x24,0x99,0xcb,0x82,0x48,0xff};
    static std::uint8_t c50[32] = {0x8b,0x62,0x20,0xee,0xb1,0x55,0x16,0x9e,0xb9,0x54,0x0c,0x95,0x13,0x55,0x6d,0x4c,0x90,0xff,0x90,0x6f,0xa6,0xee,0x66,0xdc,0x0b,0x46,0x04,0x59,0xe6,0x9c,0x94,0x9b};
    sm9_fn_from_bytes(a, a50);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c50, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a51[32] = {0x33,0x30,0x14,0x65,0x48,0xcc,0x09,0x14,0x01,0xbf,0x2d,0x23,0xd4,0x64,0x47,0x34,0x04,0xce,0x80,0x3a,0x78,0x63,0x94,0xed,0x9d,0x84,0xf2,0x53,0x03,0xb2,0x84,0x8f};
    static std::uint8_t c51[32] = {0x45,0x17,0x48,0x61,0xf8,0xba,0x40,0xe4,0xc1,0x78,0x14,0x2b,0xd7,0x4a,0x7f,0xfc,0x9c,0xe6,0x2c,0x44,0x77,0x00,0x59,0xd6,0xa8,0x30,0x9e,0x9f,0xb4,0xdb,0x11,0xb6};
    sm9_fn_from_bytes(a, a51);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c51, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a52[32] = {0x69,0xc6,0xd4,0x66,0xc6,0x0c,0x26,0xf6,0x7f,0x24,0x2d,0x98,0x27,0x93,0x92,0x62,0x89,0xf9,0x8d,0xb5,0xce,0x21,0xea,0x19,0xf0,0x71,0x1a,0x2f,0xdd,0xcd,0x6f,0x84};
    static std::uint8_t c52[32] = {0x65,0xa0,0x57,0xbc,0xba,0x96,0x07,0x72,0x7f,0x37,0x20,0x75,0x56,0x32,0xb4,0x45,0x56,0x96,0xc6,0xf5,0xce,0x11,0xdb,0xa8,0xf9,0xc7,0x96,0x6c,0xa2,0x9e,0xe3,0x59};
    sm9_fn_from_bytes(a, a52);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c52, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a53[32] = {0x91,0xb5,0x81,0xa4,0x24,0x37,0x1e,0x13,0xc0,0x5c,0x27,0x29,0x86,0x4f,0x7f,0x86,0x55,0xfa,0x18,0x59,0xb3,0x32,0x92,0xe7,0x26,0xe5,0xe4,0x6a,0x3f,0x84,0x64,0x29};
    static std::uint8_t c53[32] = {0x3e,0xf6,0xbe,0xdc,0xbb,0xf7,0x83,0x1d,0x5c,0x66,0xd7,0x06,0x46,0x79,0x88,0x4e,0x4a,0x93,0xb9,0x23,0xcd,0x40,0x11,0xc9,0xd0,0xb2,0x7f,0xd5,0x24,0xd7,0xca,0xa5};
    sm9_fn_from_bytes(a, a53);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c53, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a54[32] = {0xa5,0x6e,0x5e,0xb8,0xbe,0xf6,0x49,0xc6,0x75,0xda,0xaf,0x5c,0xbf,0x61,0x5f,0x02,0x0b,0x95,0x39,0x9c,0x12,0x55,0x2f,0xa2,0x7d,0x61,0x0b,0x3d,0x71,0xf9,0x59,0x98};
    static std::uint8_t c54[32] = {0x3f,0x04,0x9e,0x43,0x17,0x62,0x53,0xaa,0x3f,0xf2,0xf3,0xc9,0x65,0x5d,0x22,0x5c,0xf8,0xa4,0xce,0x9c,0x40,0xf7,0xd9,0xd5,0xb0,0x47,0x47,0x65,0x97,0xf4,0xe5,0x87};
    sm9_fn_from_bytes(a, a54);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c54, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a55[32] = {0x94,0x5c,0xdf,0xda,0xe8,0x41,0xe5,0x08,0x35,0x49,0x70,0xe7,0x63,0xf1,0xcd,0xf3,0xc8,0x91,0x42,0x15,0xd3,0x03,0x96,0x72,0x66,0x41,0x9a,0xa3,0xe1,0x6b,0x7c,0x25};
    static std::uint8_t c55[32] = {0x5f,0x26,0xd5,0xf8,0x6e,0xa6,0xb0,0x3c,0x20,0xd5,0xd8,0x6d,0x30,0x6c,0x0a,0x3a,0xbc,0x44,0x56,0x26,0x7e,0xa4,0x30,0x42,0xf6,0x6b,0xe9,0xeb,0x86,0xfb,0x51,0x4b};
    sm9_fn_from_bytes(a, a55);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c55, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a56[32] = {0x0e,0xf0,0x38,0x2c,0x94,0xe0,0x04,0xee,0xb2,0x3a,0x16,0xb1,0xc6,0x92,0x92,0x25,0xa1,0x55,0xe8,0x78,0x7c,0xd5,0x22,0x04,0x99,0x9c,0xe8,0xf4,0x88,0x17,0xe6,0x8e};
    static std::uint8_t c56[32] = {0x3f,0x2f,0xe4,0xbb,0xc5,0x53,0xf4,0x04,0x8b,0x31,0x61,0xc2,0xbe,0xfd,0x40,0x3a,0x95,0x1d,0x48,0x37,0x46,0x47,0x67,0xce,0x3b,0x9b,0x19,0x50,0xb3,0xb3,0xdf,0xd5};
    sm9_fn_from_bytes(a, a56);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c56, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a57[32] = {0x77,0x57,0xfd,0x90,0x2b,0x29,0x45,0x35,0x6a,0x4f,0x76,0x41,0xcb,0xde,0x54,0x35,0x7d,0x78,0x2b,0x24,0xea,0x7d,0x5a,0xa5,0x95,0x85,0x94,0x38,0x9a,0xa4,0x05,0x05};
    static std::uint8_t c57[32] = {0x3f,0x59,0x5e,0xe8,0xe0,0x51,0x6f,0xb5,0xf6,0xa4,0xf2,0x2b,0x25,0x64,0x47,0x84,0x30,0xaf,0x53,0xd7,0x48,0xb6,0x03,0xea,0x61,0xef,0x0d,0xd0,0xc6,0xa2,0xdb,0xae};
    sm9_fn_from_bytes(a, a57);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c57, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a58[32] = {0x11,0x44,0x70,0x78,0xa9,0xb9,0xe1,0x7a,0xc7,0x44,0xd3,0xee,0x17,0xe0,0x22,0x17,0xd4,0x5a,0x8e,0x91,0x3a,0x49,0x9c,0x69,0x09,0x75,0x39,0x87,0x91,0xec,0x99,0x42};
    static std::uint8_t c58[32] = {0x48,0x7d,0x70,0x23,0x03,0x68,0x4f,0x6d,0x6e,0xb5,0x62,0x45,0x1d,0x98,0x6d,0x59,0x59,0x69,0xc3,0x1c,0x6d,0x69,0xdc,0x1b,0x83,0x7f,0x4b,0xa8,0xd4,0x22,0x98,0xa3};
    sm9_fn_from_bytes(a, a58);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c58, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a59[32] = {0x83,0xf5,0x33,0x0e,0xc6,0xa7,0x25,0xa1,0xa2,0x44,0x29,0x3e,0xfb,0xb4,0x70,0x66,0x50,0x89,0xb3,0x85,0x3f,0x10,0x1c,0x01,0xf6,0x9c,0xdb,0xa1,0x0e,0xe9,0xb9,0xe6};
    static std::uint8_t c59[32] = {0xaa,0x1b,0xc0,0x95,0xe8,0x16,0xc5,0x10,0x5a,0x2c,0x28,0x5a,0x36,0xe5,0x9b,0xe3,0xf3,0xd7,0x51,0xfa,0x58,0x2e,0x07,0x7e,0xbd,0x4c,0x4e,0x37,0xbf,0x77,0xf9,0xcb};
    sm9_fn_from_bytes(a, a59);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c59, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a60[32] = {0x31,0x9f,0xca,0x1a,0x7a,0x86,0xc0,0x18,0x62,0xf5,0x7e,0x10,0xdb,0x83,0xaf,0x84,0x03,0xc4,0x3d,0xc4,0xe7,0xbe,0x4d,0x42,0x50,0x61,0xcd,0xb7,0x6e,0x6d,0x75,0x5f};
    static std::uint8_t c60[32] = {0x87,0xe2,0x6b,0x23,0x51,0xda,0x12,0x6f,0x69,0x9c,0x61,0x2b,0x55,0x88,0x4a,0x66,0x56,0x7d,0x0c,0x85,0x05,0x55,0xec,0x49,0xbe,0x81,0x4f,0xcd,0x7e,0x09,0x5a,0xda};
    sm9_fn_from_bytes(a, a60);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c60, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a61[32] = {0x3b,0xd7,0xe7,0xce,0xf3,0xfb,0x49,0x6b,0xed,0x3f,0xf3,0x70,0xd9,0x5d,0xb1,0xe2,0xd1,0xb4,0x2d,0x40,0x36,0xda,0x43,0x1e,0xf9,0x88,0xa0,0x2c,0x73,0x2f,0x99,0x3b};
    static std::uint8_t c61[32] = {0x28,0xba,0x73,0x19,0x63,0xa0,0x57,0x64,0x64,0x4c,0x4a,0x48,0x38,0xa3,0xe7,0xba,0x3f,0x01,0x56,0x20,0xe7,0x24,0x3c,0x6a,0x9b,0x6b,0x96,0x4c,0x17,0x8c,0x7d,0x07};
    sm9_fn_from_bytes(a, a61);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c61, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a62[32] = {0x07,0x17,0xa7,0xb6,0x7b,0x28,0xb4,0x14,0x4f,0x69,0x21,0xed,0x14,0x39,0x40,0xc1,0xa6,0x8e,0xba,0x4b,0xe9,0x2f,0x9f,0x5d,0x45,0xf7,0x89,0x9d,0x62,0xe6,0x07,0x60};
    static std::uint8_t c62[32] = {0x85,0x53,0x00,0x38,0xac,0x12,0xea,0xec,0x68,0xf4,0x9c,0x79,0x67,0xb2,0x8e,0x53,0x3f,0xef,0x40,0x07,0xfe,0xf1,0xbd,0x2d,0x29,0xfa,0x8b,0x63,0xab,0x81,0xbd,0xdb};
    sm9_fn_from_bytes(a, a62);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c62, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a63[32] = {0x9a,0x55,0xb6,0xd3,0xa9,0xd3,0x1f,0x6e,0x9a,0x6f,0x9c,0x68,0x72,0x78,0xdb,0x0f,0x47,0xbb,0x63,0x3b,0xf3,0x5d,0x49,0x0a,0xe4,0x59,0x0a,0xfd,0x8e,0x59,0x7b,0x91};
    static std::uint8_t c63[32] = {0x97,0x62,0x20,0x1d,0xe7,0x49,0x19,0xed,0xc2,0x04,0xfb,0x98,0x59,0x60,0xa6,0x6a,0x89,0x50,0x8a,0xf0,0x19,0x14,0xd7,0x20,0x9a,0xf1,0x70,0x75,0xcc,0x30,0x41,0x87};
    sm9_fn_from_bytes(a, a63);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c63, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a64[32] = {0x0b,0xaa,0x94,0x79,0xaf,0xdb,0x44,0x37,0x73,0x63,0xbf,0x3d,0xa7,0xc3,0x33,0x95,0xec,0xe6,0xd0,0xa9,0x4e,0x92,0xa9,0xa6,0x55,0xe9,0x09,0x66,0x2e,0x85,0x63,0xc1};
    static std::uint8_t c64[32] = {0x52,0x9e,0x07,0xd5,0xea,0x6d,0x83,0xa3,0x5a,0xc0,0xe1,0xe4,0xd2,0x1b,0xdf,0xe6,0x13,0xa6,0x2f,0x97,0xa4,0xf2,0xde,0xd7,0xfa,0x04,0xa1,0xc4,0xd6,0x86,0xc4,0x6f};
    sm9_fn_from_bytes(a, a64);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c64, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a65[32] = {0x9b,0xe3,0xaa,0x74,0x40,0x3a,0xcd,0x89,0x64,0x64,0x6a,0x77,0xc1,0xea,0x2a,0x62,0x61,0x1e,0xd8,0xcd,0xdc,0xfc,0x79,0x11,0x8d,0xac,0x45,0x01,0x06,0xb3,0x3c,0x9f};
    static std::uint8_t c65[32] = {0x8b,0xa0,0x28,0xb0,0xda,0xaf,0xdf,0xe2,0xba,0x63,0xd6,0x7e,0x98,0xe7,0x20,0x21,0x12,0xe9,0x11,0x83,0x77,0x5c,0x58,0xe0,0x8a,0xa1,0x9e,0x41,0xb7,0x85,0x02,0x5c};
    sm9_fn_from_bytes(a, a65);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c65, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a66[32] = {0x21,0x5a,0x42,0xb5,0xb2,0x67,0x1a,0x91,0xc4,0x49,0x1e,0xa4,0x2a,0xe3,0xab,0xec,0x0a,0x1b,0x88,0x62,0x07,0x00,0x88,0x58,0xdb,0x11,0x88,0xc8,0x69,0xe6,0x90,0x73};
    static std::uint8_t c66[32] = {0x7e,0xb6,0xa3,0x89,0xdd,0x5e,0x8a,0x45,0xdf,0x14,0xd7,0x80,0xb1,0xc0,0xee,0x5c,0xa5,0xc3,0x54,0x00,0x46,0xf9,0x56,0x1b,0x2b,0x57,0x96,0xe3,0xb7,0xdb,0x58,0x87};
    sm9_fn_from_bytes(a, a66);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c66, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a67[32] = {0x0b,0x7f,0x49,0xe7,0x37,0x34,0xd4,0x35,0xfa,0xd6,0x66,0x6f,0xe3,0xb0,0x71,0x92,0xca,0x84,0x34,0xab,0x88,0xf0,0x6c,0xd0,0xe2,0x6e,0x2d,0xeb,0xf6,0x50,0x8b,0x90};
    static std::uint8_t c67[32] = {0xae,0x18,0xe9,0x08,0xd9,0x91,0xb1,0xaf,0x63,0xed,0x27,0xec,0x04,0xf4,0x55,0x72,0x1a,0x4a,0xd7,0x9a,0xe3,0x5d,0xc6,0x6c,0xbc,0x7c,0x3e,0x35,0xc5,0x7f,0x5d,0x06};
    sm9_fn_from_bytes(a, a67);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c67, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a68[32] = {0x8f,0x07,0x50,0x94,0xa9,0xb5,0x4b,0xf7,0x56,0x47,0x6c,0x52,0xa0,0xa0,0x7b,0xf1,0x6e,0xea,0x69,0xc5,0xcc,0xb8,0xca,0x36,0xc0,0x25,0xf8,0x95,0x8d,0xe0,0x56,0x89};
    static std::uint8_t c68[32] = {0x57,0x9c,0x17,0x57,0x21,0xdb,0x73,0x67,0xbb,0x48,0x29,0x56,0x0a,0x72,0x4e,0xde,0x90,0x49,0x50,0xa9,0xa1,0x0f,0xf3,0x85,0x6a,0xd0,0x5f,0xc3,0xe6,0x02,0xd9,0x8e};
    sm9_fn_from_bytes(a, a68);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c68, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a69[32] = {0x3b,0x00,0x8c,0x21,0x9e,0x11,0x65,0xb6,0x89,0x8e,0x40,0xd2,0x2f,0x6f,0x4d,0xea,0x40,0x16,0xeb,0x45,0x13,0xef,0xff,0x2a,0x68,0x8c,0x77,0x7a,0x01,0x74,0x63,0x55};
    static std::uint8_t c69[32] = {0x4f,0x3c,0xd8,0x59,0x29,0xc6,0xb0,0x2b,0x68,0x00,0x69,0x0c,0x26,0x2b,0x8f,0x19,0x4e,0x47,0x5c,0x39,0x2e,0xbd,0x9d,0xf4,0xe7,0x84,0xac,0x7f,0x8a,0x43,0xa3,0xbf};
    sm9_fn_from_bytes(a, a69);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c69, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a70[32] = {0x1e,0x1a,0xf6,0x0e,0xcc,0x99,0xa8,0xee,0x76,0xf6,0xe7,0x6e,0xaa,0x0b,0xc3,0xf2,0xfd,0xb5,0x6c,0x44,0x45,0xbe,0xbc,0x1b,0xc6,0xb4,0x5e,0xc2,0x41,0xa0,0xf0,0x72};
    static std::uint8_t c70[32] = {0x15,0x32,0xe7,0xe3,0x1c,0xb7,0x0a,0x4d,0x21,0x94,0xc6,0x68,0x49,0x82,0x26,0xe4,0x09,0xf5,0x98,0x5c,0xf9,0x14,0xa0,0x2d,0xe9,0xce,0x83,0xb1,0xa1,0x1a,0x78,0x30};
    sm9_fn_from_bytes(a, a70);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c70, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a71[32] = {0x45,0xfd,0x73,0x3b,0xee,0x8b,0x0e,0xea,0x49,0xe7,0xfd,0x94,0x05,0x88,0x84,0x73,0xe7,0x24,0x34,0x9a,0x1b,0x75,0xe5,0x3a,0xd4,0xf2,0xf1,0xf4,0x68,0xc5,0x9d,0xda};
    static std::uint8_t c71[32] = {0x0d,0x63,0x27,0x6e,0x0c,0x68,0x9a,0x91,0x31,0x92,0xab,0x54,0xc1,0x47,0xbf,0x88,0xab,0x6d,0x8f,0xe4,0x06,0xdf,0xb8,0x77,0x2b,0x33,0xce,0x91,0x40,0x39,0x0d,0x5c};
    sm9_fn_from_bytes(a, a71);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c71, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a72[32] = {0x1e,0x90,0x4a,0x6c,0xfe,0x39,0xef,0x4d,0x3f,0x4e,0xb8,0xb6,0x31,0x3f,0x98,0x0c,0x94,0xe7,0xce,0x72,0x8d,0xdd,0x36,0x67,0x40,0xe6,0xce,0xff,0x64,0x34,0xe9,0xec};
    static std::uint8_t c72[32] = {0x08,0xae,0x6c,0xed,0xb1,0x25,0x4b,0x67,0x07,0x2a,0xf7,0xfb,0x5c,0x83,0xe5,0x0e,0xae,0xa5,0x97,0x41,0x0f,0xd2,0xce,0x1b,0x6f,0x5c,0x5a,0x26,0x08,0x81,0x8d,0x19};
    sm9_fn_from_bytes(a, a72);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c72, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a73[32] = {0x41,0x1c,0xc9,0xcc,0x58,0x52,0xb7,0x36,0xca,0xbc,0x43,0x0f,0x03,0xd2,0xd4,0xb9,0x1e,0x9b,0x97,0xba,0x7d,0x42,0xe5,0xbc,0x9e,0xa1,0x04,0x16,0xa8,0x98,0x63,0xcf};
    static std::uint8_t c73[32] = {0x63,0xf2,0x16,0x9c,0x8f,0x01,0x23,0x17,0xef,0xd6,0x79,0xc3,0x62,0x44,0xd5,0xfe,0xf5,0x79,0x27,0x72,0x9b,0xce,0x50,0xcd,0x0a,0xc0,0x5a,0x37,0x55,0x3a,0xbe,0x54};
    sm9_fn_from_bytes(a, a73);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c73, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a74[32] = {0x93,0xc6,0x0f,0x00,0xe4,0x06,0xd4,0xd6,0x25,0x11,0xd4,0x29,0xcf,0x4f,0x96,0x41,0x80,0x00,0x90,0xa5,0xb1,0xa1,0xea,0x81,0x1a,0x11,0xd1,0x39,0x2d,0xa3,0xba,0x91};
    static std::uint8_t c74[32] = {0xa4,0x09,0x6b,0xd9,0xd9,0x3c,0x5d,0x9a,0x27,0x58,0x38,0x3a,0xfd,0x42,0x4e,0x7e,0xa7,0xfe,0xb5,0x21,0x69,0x5e,0x2f,0x46,0x41,0x83,0x53,0x40,0xc3,0x99,0x72,0x5d};
    sm9_fn_from_bytes(a, a74);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c74, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a75[32] = {0x9c,0x26,0xc6,0x70,0xd4,0x5f,0xbc,0xac,0x48,0x9b,0xa5,0xaa,0xc9,0xa0,0xb4,0x8a,0x0e,0x89,0x30,0x4b,0x52,0x61,0x8c,0xd2,0xd7,0x96,0x0d,0x62,0x38,0xb8,0xe6,0x79};
    static std::uint8_t c75[32] = {0x72,0x48,0xf4,0x68,0xa7,0xa5,0x07,0x3a,0x9d,0x18,0x2c,0x68,0xcd,0xbd,0xd9,0x57,0x6a,0xa2,0x12,0xac,0x8b,0xd7,0x8e,0xd7,0x8f,0x60,0x95,0xff,0x88,0x91,0x6b,0x01};
    sm9_fn_from_bytes(a, a75);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c75, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a76[32] = {0x30,0xc2,0x16,0x9b,0x0d,0x18,0x73,0xfd,0x56,0xbb,0x94,0xac,0xeb,0xe5,0xb2,0x4c,0x4f,0xa2,0x84,0xb8,0x7b,0x0d,0xdf,0x2c,0x17,0xcf,0xb4,0x10,0xd2,0x7a,0xf3,0xa5};
    static std::uint8_t c76[32] = {0x75,0xd2,0xaa,0x8e,0xe7,0x53,0xaf,0x2e,0x5c,0x5b,0x61,0xbb,0xb5,0x72,0x9c,0x7d,0xe9,0xf7,0x98,0xd8,0x92,0x84,0x03,0xac,0x9d,0xe7,0xa6,0x6e,0x14,0xab,0x4a,0x9a};
    sm9_fn_from_bytes(a, a76);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c76, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a77[32] = {0x7b,0x3e,0xd3,0x34,0x34,0x81,0xd0,0x4b,0x3a,0x4d,0x46,0x49,0xf4,0x2f,0x0b,0x6f,0x2b,0xbc,0xf9,0x52,0x8f,0x37,0xd4,0x9b,0x64,0x5c,0x06,0xe8,0x5a,0x8a,0xd0,0x8a};
    static std::uint8_t c77[32] = {0x16,0x67,0xfd,0x15,0x9b,0x35,0xa5,0x52,0x4c,0x9a,0x77,0x12,0xf8,0xf1,0x53,0x7d,0xb7,0xcf,0xfa,0xb3,0x3b,0x57,0xbb,0xd5,0x2d,0x8c,0x59,0xf4,0xbb,0x50,0x79,0xa1};
    sm9_fn_from_bytes(a, a77);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c77, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a78[32] = {0x48,0x7a,0xb9,0x09,0x2d,0x1e,0xe5,0x2c,0x7c,0x11,0xd8,0x6d,0xea,0xf9,0xd5,0xde,0x8f,0xdd,0x2f,0x8b,0xe6,0x47,0xed,0x1f,0xaa,0x90,0xa5,0xfb,0xf9,0x86,0x03,0xd3};
    static std::uint8_t c78[32] = {0x2b,0xa3,0x04,0xd4,0x5f,0xa7,0xca,0x23,0xf5,0x79,0x74,0x0b,0x05,0xa4,0x7b,0x4c,0x00,0x6e,0x84,0x05,0xcf,0xb3,0x83,0x23,0x45,0x8d,0x02,0x0e,0x98,0x68,0x80,0x1f};
    sm9_fn_from_bytes(a, a78);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c78, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a79[32] = {0x48,0xbc,0x19,0x7a,0x9b,0xc2,0x67,0x6f,0xca,0xd4,0x93,0x20,0x90,0xd3,0x9e,0x4c,0x52,0xc6,0xea,0xb4,0x59,0x5c,0x36,0x7d,0x87,0x0a,0x2a,0xcd,0x46,0xb3,0xa0,0x1f};
    static std::uint8_t c79[32] = {0x7b,0x84,0x23,0x80,0x8e,0xf5,0x8c,0xf5,0x39,0x7d,0x25,0x4c,0xad,0x67,0x0e,0xd9,0x64,0x2e,0xbf,0x1a,0xe6,0xc4,0x21,0x75,0x0b,0x48,0xb6,0xe4,0x26,0xaf,0x72,0xc6};
    sm9_fn_from_bytes(a, a79);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c79, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a80[32] = {0x00,0xba,0x6b,0xb3,0xed,0x54,0xc8,0x43,0xbb,0x41,0x47,0xa3,0xfb,0xb4,0x47,0xe0,0x6c,0x9f,0x59,0xfa,0x87,0x8d,0xf7,0x77,0x8a,0x2c,0x12,0xe3,0xaa,0x9f,0x1a,0x11};
    static std::uint8_t c80[32] = {0x9a,0x66,0x08,0x50,0x22,0xb3,0x27,0xda,0x09,0x28,0x18,0x2a,0x3b,0x72,0x58,0x4d,0xd1,0x56,0x56,0xa8,0x70,0x33,0xda,0x3f,0xe9,0x9b,0x2f,0xfd,0xb2,0xeb,0x63,0x46};
    sm9_fn_from_bytes(a, a80);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c80, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a81[32] = {0x32,0xfc,0xd0,0xf5,0xd9,0xb5,0xcd,0x0c,0x24,0xf9,0xc5,0x2e,0x6c,0x42,0x55,0xa6,0x9a,0x93,0x9c,0x19,0x5b,0x8f,0x8e,0xc6,0x33,0xf1,0x57,0xb4,0x35,0xc7,0x94,0x50};
    static std::uint8_t c81[32] = {0x5f,0x7b,0xdd,0x1e,0x53,0xda,0xd7,0x19,0xb7,0x29,0x84,0x91,0x8d,0x12,0x4a,0x29,0xa3,0x62,0x23,0xa5,0x5c,0x7f,0xb6,0x4c,0x5d,0x83,0x09,0xd5,0xc6,0x68,0xeb,0xc8};
    sm9_fn_from_bytes(a, a81);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c81, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a82[32] = {0x22,0x07,0xc6,0x8f,0x2a,0x7a,0x97,0xb4,0xae,0xeb,0x25,0x00,0x1b,0xe0,0x7c,0x90,0x01,0x01,0x33,0x1c,0xe6,0x85,0x9e,0xed,0x79,0xf1,0xff,0x6d,0x6c,0x8d,0x98,0xf2};
    static std::uint8_t c82[32] = {0x95,0xda,0xad,0xf2,0x4c,0x9a,0xa3,0x9e,0x5b,0xcf,0x3d,0xb2,0x8f,0xb4,0x80,0x3d,0x13,0xe9,0x5a,0xdd,0xd3,0x0c,0x29,0x08,0x2b,0x04,0x96,0xd8,0x61,0x9b,0x4e,0x1c};
    sm9_fn_from_bytes(a, a82);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c82, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a83[32] = {0xa0,0xf3,0x19,0x12,0x43,0x27,0xed,0x2b,0x19,0x8e,0xd8,0x1d,0x36,0xd4,0x7c,0x96,0xe3,0x0d,0xdf,0xc1,0x1f,0x86,0x37,0xe5,0xbd,0xa2,0xff,0x33,0xf7,0xfc,0xec,0x32};
    static std::uint8_t c83[32] = {0xb3,0x00,0x6b,0x44,0x7b,0x7f,0xde,0xbb,0xfb,0x73,0xf2,0x8b,0x21,0x4b,0xeb,0x37,0xee,0x43,0xe2,0x91,0xe3,0xa9,0xd7,0x4f,0xc2,0xd6,0xac,0x91,0x82,0x89,0x6c,0x39};
    sm9_fn_from_bytes(a, a83);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c83, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a84[32] = {0x31,0x60,0x01,0xa8,0x35,0xb4,0x40,0xc7,0x3a,0x89,0x7c,0x82,0xfe,0x34,0x25,0x1f,0xb5,0x80,0xfb,0x09,0x89,0x4e,0x85,0x78,0x1b,0x2c,0x7f,0x45,0x63,0x03,0x48,0xf1};
    static std::uint8_t c84[32] = {0x41,0xdd,0x40,0x0c,0x10,0xe8,0xfe,0x13,0x83,0x2f,0x15,0xd7,0x87,0x12,0x19,0x15,0x24,0xae,0x66,0xdf,0x42,0xa4,0x98,0xd0,0x7b,0x45,0x32,0x75,0x72,0x6b,0x62,0xa5};
    sm9_fn_from_bytes(a, a84);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c84, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a85[32] = {0x9f,0xe5,0xc1,0xb2,0xcc,0x58,0xc3,0x0a,0x66,0x61,0x13,0x4e,0x02,0x4d,0xc7,0xf7,0xc1,0x2b,0x25,0x0a,0xdc,0xc0,0xf4,0x33,0xa2,0x25,0x54,0x02,0x74,0xb8,0xd3,0xe9};
    static std::uint8_t c85[32] = {0x1d,0x47,0xc6,0x75,0x77,0xc3,0x5c,0x21,0xd9,0x4d,0xac,0xc8,0xc4,0xa6,0x6c,0x9d,0xd4,0x8d,0x9c,0x23,0x50,0x91,0xe1,0x50,0x67,0x31,0x83,0x1a,0x58,0x7b,0x25,0x3e};
    sm9_fn_from_bytes(a, a85);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c85, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a86[32] = {0x53,0x09,0x27,0x92,0x47,0x7c,0x1b,0xd0,0xac,0x5d,0xf9,0x02,0x99,0x83,0x93,0x38,0xf5,0x37,0xb6,0xb8,0x3c,0x25,0x3c,0x2d,0xd7,0x68,0x9b,0xb8,0xe3,0xa7,0xe2,0x9e};
    static std::uint8_t c86[32] = {0x46,0x8f,0x36,0x97,0x36,0x7c,0x89,0x67,0xec,0xd3,0x90,0xdc,0x36,0x39,0x23,0xfd,0xc4,0xb8,0x62,0xd8,0x48,0xf3,0x58,0x22,0x25,0x8b,0x74,0x20,0xca,0x88,0xa7,0x25};
    sm9_fn_from_bytes(a, a86);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c86, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a87[32] = {0x2b,0x90,0xf3,0x3c,0x55,0x86,0xc7,0x76,0xf4,0x3b,0x26,0xf7,0xa3,0xed,0xa8,0x32,0xae,0xc7,0x2e,0xcf,0xf1,0x3f,0x61,0xa0,0x47,0x79,0xef,0xd6,0x2d,0x57,0x88,0xd7};
    static std::uint8_t c87[32] = {0x2f,0x7b,0xb7,0x9d,0x09,0x15,0x7c,0x20,0x84,0x00,0xd5,0x74,0xb7,0x38,0x99,0xab,0x3f,0x98,0xa0,0xfd,0x0f,0x60,0x6f,0xb2,0x06,0x99,0x7a,0xa2,0x79,0x47,0x60,0x9e};
    sm9_fn_from_bytes(a, a87);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c87, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a88[32] = {0x79,0xf8,0x2d,0x1f,0x67,0xf3,0xba,0x9a,0x1b,0xba,0xf5,0x14,0x77,0x4f,0xd4,0x54,0xe7,0xf9,0xa6,0x21,0x55,0xdc,0x33,0xca,0xc9,0x81,0x55,0x61,0xa2,0xcc,0x2f,0xa2};
    static std::uint8_t c88[32] = {0x7d,0xb8,0x44,0x84,0x31,0xe4,0x01,0x54,0x1c,0xf4,0x18,0x25,0xb6,0x03,0x21,0xe0,0x21,0x03,0x28,0xd9,0x20,0x75,0x97,0x17,0x7e,0x94,0xde,0x73,0x9a,0x0c,0x3f,0x25};
    sm9_fn_from_bytes(a, a88);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c88, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a89[32] = {0x03,0x0f,0x78,0x74,0x46,0x6f,0xa7,0xe5,0xd6,0x01,0x9e,0x0a,0x93,0x02,0xe0,0xb9,0x9a,0x08,0xb2,0xe7,0x88,0x7a,0xc1,0x88,0x81,0x31,0x43,0x7f,0xf4,0x06,0xca,0xd0};
    static std::uint8_t c89[32] = {0xa3,0x25,0x15,0x32,0xc4,0xc3,0x36,0x2c,0x60,0x7e,0x0e,0x5d,0xbf,0xb6,0x5c,0xa0,0x99,0x8c,0xe9,0x96,0x4f,0x3c,0x37,0x2f,0x80,0xd3,0xdd,0x70,0x60,0xf6,0xee,0x7a};
    sm9_fn_from_bytes(a, a89);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c89, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a90[32] = {0x86,0x25,0x72,0x23,0x8e,0xc7,0xbf,0xb9,0xe4,0xdb,0x90,0xf2,0xc2,0xb6,0xf7,0xce,0x75,0xd3,0xaa,0x0f,0x72,0xfe,0xf3,0x54,0x11,0xdd,0x91,0x6a,0x2b,0xb4,0x6d,0x77};
    static std::uint8_t c90[32] = {0x9c,0xe0,0x79,0x62,0x87,0x05,0x15,0x3e,0xe8,0x96,0x6b,0x05,0xd4,0xd5,0x2a,0xae,0xc0,0xd8,0x97,0x14,0xa0,0x52,0xd1,0x4d,0xfe,0x90,0x94,0x8e,0x54,0xf0,0xba,0xbc};
    sm9_fn_from_bytes(a, a90);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c90, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a91[32] = {0x81,0xe2,0x7c,0x35,0xb3,0x22,0x3e,0x20,0xdf,0xfd,0x26,0x38,0xb6,0x51,0x4e,0x63,0xfc,0x14,0x71,0x46,0x63,0x2d,0x54,0xdc,0xa9,0xdc,0xd9,0x52,0x0f,0x42,0x02,0x4d};
    static std::uint8_t c91[32] = {0x7d,0x96,0xeb,0x33,0xb8,0xb4,0x7a,0x96,0x84,0xfd,0xa8,0xf1,0x7d,0x34,0x41,0xfd,0x87,0xcb,0xc9,0xc0,0xc6,0x26,0x20,0xfb,0xd1,0xa8,0xe5,0xef,0x56,0xb4,0xa5,0x70};
    sm9_fn_from_bytes(a, a91);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c91, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a92[32] = {0x03,0x4f,0x09,0xf0,0x0a,0x10,0x8c,0x5f,0xc2,0x41,0x35,0x6e,0x56,0x81,0x69,0x64,0xa1,0x76,0xd8,0x79,0x90,0x59,0xbe,0x2b,0xfe,0x7f,0xd2,0x0f,0xc0,0x01,0xfe,0x7b};
    static std::uint8_t c92[32] = {0x52,0x08,0x6a,0x7b,0x6c,0x07,0x40,0xa6,0x3d,0x72,0x05,0xb9,0x03,0x66,0xdd,0xbc,0x9d,0x03,0xde,0x7f,0x72,0xa3,0x1e,0xed,0x2f,0x28,0xb5,0x9c,0x6b,0x30,0x6d,0x28};
    sm9_fn_from_bytes(a, a92);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c92, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a93[32] = {0x77,0x21,0xcf,0x57,0xe3,0xee,0xce,0xa9,0xf0,0x8b,0xb0,0x74,0x11,0xd3,0x5b,0x7d,0xf9,0x57,0x73,0xdf,0x19,0x3d,0xae,0x0d,0x95,0x32,0xa3,0xc2,0xc4,0x10,0x48,0xcd};
    static std::uint8_t c93[32] = {0x66,0xf8,0x5c,0x77,0x98,0xa8,0x9d,0xc6,0x28,0x67,0xe3,0x7d,0x1f,0x10,0x26,0x5d,0x9c,0xfe,0x5b,0xcc,0x62,0x45,0xc3,0xb8,0x67,0xcc,0xd7,0xd2,0x2b,0xab,0x44,0x65};
    sm9_fn_from_bytes(a, a93);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c93, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a94[32] = {0x06,0x96,0x5f,0xb1,0x11,0x4c,0xf1,0x7b,0x5b,0x34,0x73,0x07,0x36,0xe2,0x97,0x39,0x17,0x8b,0xe2,0x31,0x4e,0x53,0x11,0x81,0x5a,0x50,0x7c,0x0b,0x40,0x36,0xe9,0x1a};
    static std::uint8_t c94[32] = {0x3c,0x2b,0x04,0x1c,0x8a,0x87,0x91,0x4e,0x6c,0xce,0x40,0xa2,0x97,0x80,0x4b,0xfe,0x79,0xa6,0x57,0xe5,0x83,0xe1,0xc3,0x10,0x7b,0x24,0xad,0xa6,0x4b,0xec,0x7e,0x46};
    sm9_fn_from_bytes(a, a94);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c94, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a95[32] = {0x81,0xaf,0x54,0x2c,0xd1,0x4e,0xbe,0x42,0x65,0x70,0x4b,0xb1,0xec,0xad,0x55,0x61,0xa5,0xab,0x47,0xed,0xe7,0x5c,0x5c,0xe9,0x2f,0x75,0x2b,0xf1,0x47,0x3a,0xe1,0xfa};
    static std::uint8_t c95[32] = {0x60,0xd6,0xdf,0x70,0x40,0x39,0x16,0xb7,0xcd,0xb7,0x4b,0x4f,0x84,0xd2,0x4a,0x59,0x7e,0xd1,0x8e,0x48,0xdd,0xac,0x90,0xcb,0x71,0x80,0xfb,0xfc,0xef,0x6d,0xec,0x2b};
    sm9_fn_from_bytes(a, a95);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c95, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a96[32] = {0x73,0x2e,0x85,0x56,0x77,0xc5,0xd4,0x6c,0x63,0xec,0xe1,0xc4,0xf4,0x30,0x35,0xa7,0x35,0xb2,0x40,0xc4,0x0a,0x2c,0xa1,0xbf,0x22,0x1d,0x68,0x7b,0xa7,0x58,0xc9,0xc0};
    static std::uint8_t c96[32] = {0x0a,0xa9,0x48,0x64,0x94,0xef,0xe2,0xdd,0x9f,0xd8,0x4c,0xe9,0x0a,0xf0,0xd9,0xd9,0xf2,0xd3,0xf9,0x45,0x38,0x4e,0xe6,0x05,0x33,0x38,0x32,0xf8,0x83,0xc0,0x8a,0x17};
    sm9_fn_from_bytes(a, a96);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c96, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a97[32] = {0x43,0xc6,0x47,0xdc,0x76,0xa0,0xbb,0xf7,0xb7,0x49,0xfc,0x13,0x4a,0xfc,0x59,0x74,0x9a,0xd6,0xd1,0x30,0x4f,0x7f,0xa4,0x61,0x67,0x38,0x4a,0x6b,0xce,0x5f,0xdd,0x2d};
    static std::uint8_t c97[32] = {0x9e,0x6c,0x14,0x5e,0x7a,0xae,0x86,0xb1,0x83,0x3d,0x81,0x32,0xd5,0x6e,0x40,0xec,0xa9,0x09,0xf3,0x19,0x75,0x4f,0xb0,0x41,0xd5,0xfe,0x60,0x0e,0x7b,0x36,0xb2,0xad};
    sm9_fn_from_bytes(a, a97);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c97, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a98[32] = {0x3d,0x92,0x7e,0x4d,0x38,0xf8,0x9e,0xc3,0xe0,0x55,0x0f,0x56,0x14,0x02,0x90,0x0d,0xe5,0x46,0x2a,0x6c,0x95,0x0e,0x69,0x7b,0xe4,0x87,0x7f,0x0f,0x48,0xf4,0xbb,0xff};
    static std::uint8_t c98[32] = {0x7f,0x1b,0xdb,0x3a,0x1b,0xd6,0x26,0x53,0xf0,0x78,0xd7,0x10,0x93,0x97,0x7a,0x44,0xf7,0x88,0xce,0x4a,0x2e,0xbd,0xe6,0x0e,0x1b,0x6c,0x5f,0x98,0x52,0x2a,0xd5,0x74};
    sm9_fn_from_bytes(a, a98);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c98, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
    static std::uint8_t a99[32] = {0x0e,0x61,0x56,0x43,0x29,0x4d,0x0f,0xb7,0x27,0xe3,0x75,0xb0,0x61,0x79,0x41,0x2c,0xf7,0xfc,0x02,0x61,0x32,0x3d,0xae,0xf5,0x2c,0x02,0x62,0xe5,0x61,0x2c,0x33,0xbb};
    static std::uint8_t c99[32] = {0x4a,0xcd,0x59,0x78,0xc3,0x17,0xe2,0xbd,0x20,0x13,0x50,0x51,0x22,0x54,0x86,0x22,0x5f,0xf5,0x19,0x2c,0x88,0x79,0x4a,0xe1,0x3f,0xd9,0x88,0x50,0x7b,0x89,0x19,0xc5};
    sm9_fn_from_bytes(a, a99);
    sm9_fn_inv(c, a);
    sm9_fn_to_bytes(c_data, c);
    if (std::memcmp(c99, c_data, 32) != 0)
    {
        throw std::runtime_error("err in sm9_fn_inv");
    }
}